home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / Dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-01  |  6.3 KB  |  202 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: Dialog.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9.  
  10. #ifndef __TYPES__
  11. #include <TYPES.h>
  12. #endif
  13.  
  14. #ifndef __QUICKDRAW__
  15. #include <QUICKDRAW.h>
  16. #endif
  17.  
  18. #ifndef __EVENT__
  19. #include <EVENT.h>
  20. #endif
  21.  
  22. #ifndef __CONTROL__
  23. #include <CONTROL.h>
  24. #endif
  25.  
  26. #ifndef __WINDOW__
  27. #include <WINDOW.h>
  28. #endif
  29.  
  30. #ifndef __LINEEDIT__
  31. #include <LINEEDIT.h>
  32. #endif
  33.  
  34. #ifndef __DIALOG__
  35. #define __DIALOG__
  36.  
  37.  
  38. /* Error Codes */
  39. #define badItemType 0x150A
  40. #define newItemFailed 0x150B
  41. #define itemNotFound 0x150C
  42. #define notModalDialog 0x150D
  43.  
  44. /* Command Codes */
  45. #define getInitView 0x0001
  46. #define getInitTotal 0x0002
  47. #define getInitValue 0x0003
  48. #define scrollLineUp 0x0004
  49. #define scrollLineDown 0x0005
  50. #define scrollPageUp 0x0006
  51. #define scrollPageDown 0x0007
  52. #define scrollThumb 0x0008
  53.  
  54. /* Item Type Codes */
  55. #define buttonItem 0x000A
  56. #define checkItem 0x000B
  57. #define radioItem 0x000C
  58. #define scrollBarItem 0x000D
  59. #define userCtlItem 0x000E
  60. #define statText 0x000F
  61. #define longStatText 0x0010
  62. #define editLine 0x0011
  63. #define iconItem 0x0012
  64. #define picItem 0x0013
  65. #define userItem 0x0014
  66. #define userCtlItem2 0x0015
  67. #define longStatText2 0x0016
  68. #define itemDisable 0x8000
  69.  
  70. /* Item Type Ranges */
  71. #define minItemType 0x000A
  72. #define maxItemType 0x0016
  73.  
  74. /* ItemID Codes */
  75. #define ok 0x0001
  76. #define cancel 0x0002
  77.  
  78. /* Part Codes */
  79. #define inButton 0x0002
  80. #define inCheckBox 0x0003
  81. #define inRadioButton 0x0004
  82. #define inUpArrow 0x0005
  83. #define inDownArrow 0x0006
  84. #define inPageUp 0x0007
  85. #define inPageDown 0x0008
  86. #define inStatText 0x0009
  87. #define inGrow 0x000A
  88. #define inEditLine 0x000B
  89. #define inUserItem 0x000C
  90. #define inLongStatText 0x000D
  91. #define inIconItem 0x000E
  92. #define inLongStatText2 0x000F
  93. #define inThumb 0x0081
  94.  
  95. /* Stage Bit Vectors */
  96. #define okDefault 0x0000
  97. #define cancelDefault 0x0040
  98. #define alertDrawn 0x0080
  99.  
  100. /* Other Constants */
  101. #ifndef atItemListLength  /* AlertTemplate - Default number of Item Templates */
  102. #define atItemListLength 0x0005
  103. #endif
  104. #ifndef dtItemListLength  /* DialogTemplate - Default number of Item Templates */
  105. #define dtItemListLength 0x0008
  106. #endif
  107.  
  108. typedef GrafPortPtr DialogPtr;
  109. struct ItemTemplate {
  110.    Word itemID; /*  */
  111.    Rect itemRect; /*  */
  112.    Word itemType; /*  */
  113.    Pointer itemDescr; /*  */
  114.    Word itemValue; /*  */
  115.    Word itemFlag; /*  */
  116.    Pointer itemColor; /* pointer to appropriate type of color table */
  117. } ;
  118. typedef struct ItemTemplate ItemTemplate, *ItemTempPtr, **ItemTempHndl;
  119.  
  120. struct AlertTemplate {
  121.    Rect atBoundsRect;
  122.    Word atAlertID;
  123.    Byte atStage1;
  124.    Byte atStage2;
  125.    Byte atStage3;
  126.    Byte atStage4;
  127.    ItemTempPtr atItemList[atItemListLength]; /* Null terminated array */
  128. } ;
  129. typedef struct AlertTemplate AlertTemplate, *AlertTempPtr, **AlertTempHndl;
  130.  
  131. struct DialogTemplate {
  132.    Rect dtBoundsRect;
  133.    Boolean dtVisible;
  134.    Longint dtRefCon;
  135.    ItemTempPtr dtItemList[dtItemListLength]; /* Null terminated array */
  136. } ;
  137. typedef struct DialogTemplate DialogTemplate, *DlgTempPtr, **DlgTempHndl;
  138.  
  139. struct UserCtlItemPB {
  140.    LongProcPtr defProcParm;
  141.    Pointer titleParm;
  142.    Word param2;
  143.    Word param1;
  144. } ;
  145. typedef struct UserCtlItemPB UserCtlItemPB, *UserCtlItemPBPtr, **UserCtlItemPBHndl;
  146.  
  147. extern pascal Word Alert() inline(0x1715,dispatcher);
  148. extern pascal Word CautionAlert() inline(0x1A15,dispatcher);
  149. extern pascal void CloseDialog() inline(0x0C15,dispatcher);
  150. extern pascal Boolean DefaultFilter() inline(0x3615,dispatcher);
  151. extern pascal void DialogBootInit() inline(0x0115,dispatcher);
  152. extern pascal void DialogReset() inline(0x0515,dispatcher);
  153. extern pascal Boolean DialogSelect() inline(0x1115,dispatcher);
  154. extern pascal void DialogShutDown() inline(0x0315,dispatcher);
  155. extern pascal void DialogStartUp() inline(0x0215,dispatcher);
  156. extern pascal Boolean DialogStatus() inline(0x0615,dispatcher);
  157. extern pascal Word DialogVersion() inline(0x0415,dispatcher);
  158. extern pascal void DisableDItem() inline(0x3915,dispatcher);
  159. extern pascal void DlgCopy() inline(0x1315,dispatcher);
  160. extern pascal void DlgCut() inline(0x1215,dispatcher);
  161. extern pascal void DlgDelete() inline(0x1515,dispatcher);
  162. extern pascal void DlgPaste() inline(0x1415,dispatcher);
  163. extern pascal void DrawDialog() inline(0x1615,dispatcher);
  164. extern pascal void EnableDItem() inline(0x3A15,dispatcher);
  165. extern pascal void ErrorSound() inline(0x0915,dispatcher);
  166. extern pascal Word FindDItem() inline(0x2415,dispatcher);
  167. extern pascal Word GetAlertStage() inline(0x3415,dispatcher);
  168. extern pascal CtlRecHndl GetControlDItem() inline(0x1E15,dispatcher);
  169. extern pascal Word GetDefButton() inline(0x3715,dispatcher);
  170. extern pascal void GetDItemBox() inline(0x2815,dispatcher);
  171. extern pascal Word GetDItemType() inline(0x2615,dispatcher);
  172. extern pascal Word GetDItemValue() inline(0x2E15,dispatcher);
  173. extern pascal Word GetFirstDItem() inline(0x2A15,dispatcher);
  174. extern pascal void GetIText() inline(0x1F15,dispatcher);
  175. extern pascal void GetNewDItem() inline(0x3315,dispatcher);
  176. extern pascal DialogPtr GetNewModalDialog() inline(0x3215,dispatcher);
  177. extern pascal Word GetNextDItem() inline(0x2B15,dispatcher);
  178. extern pascal void HideDItem() inline(0x2215,dispatcher);
  179. extern pascal Boolean IsDialogEvent() inline(0x1015,dispatcher);
  180. extern pascal Word ModalDialog() inline(0x0F15,dispatcher);
  181. extern pascal LongWord ModalDialog2() inline(0x2C15,dispatcher);
  182. extern pascal void NewDItem() inline(0x0D15,dispatcher);
  183. extern pascal DialogPtr NewModalDialog() inline(0x0A15,dispatcher);
  184. extern pascal DialogPtr NewModelessDialog() inline(0x0B15,dispatcher);
  185. extern pascal Word NoteAlert() inline(0x1915,dispatcher);
  186. extern pascal void ParamText() inline(0x1B15,dispatcher);
  187. extern pascal void RemoveDItem() inline(0x0E15,dispatcher);
  188. extern pascal void ResetAlertStage() inline(0x3515,dispatcher);
  189. extern pascal void SelectIText() inline(0x2115,dispatcher);
  190. extern pascal void SelIText() inline(0x2115,dispatcher);
  191. extern pascal void SetDAFont() inline(0x1C15,dispatcher);
  192. extern pascal void SetDefButton() inline(0x3815,dispatcher);
  193. extern pascal void SetDItemBox() inline(0x2915,dispatcher);
  194. extern pascal void SetDItemType() inline(0x2715,dispatcher);
  195. extern pascal void SetDItemValue() inline(0x2F15,dispatcher);
  196. extern pascal void SetIText() inline(0x2015,dispatcher);
  197. extern pascal void ShowDItem() inline(0x2315,dispatcher);
  198. extern pascal Word StopAlert() inline(0x1815,dispatcher);
  199. extern pascal void UpdateDialog() inline(0x2515,dispatcher);
  200.  
  201. #endif
  202.